import React, { PureComponent } from 'react';
import { ContentPackage, TabC } from '../../../../comps';
import 'moment/locale/zh-cn';
import FundCheck from './fundCheck';
import PositionCheck from './positionCheck';

class ValuationCheck extends PureComponent {
  constructor(props) {
    super(props);
    this.state = {
      activeKey: '1',
    };
  }

  checkTabChange = (activeKey) => {
    this.setState({
      activeKey,
    });
  };

  render() {
    return (
      <ContentPackage
        title='估值核对'
        contentHtml={
          <div style={{ height: '100%' }}>
            <TabC
              tabSource={[
                { title: '持仓核对', key: '1', content: <PositionCheck tradingday={this.state.tradingday} /> },
                { title: '资金核对', key: '2', content: <FundCheck tradingday={this.state.tradingday} /> },
              ]}
              activeKey={this.state.activeKey}
              onChange={this.checkTabChange}
            />
          </div>
        }
      />
    );
  }
}
export default ValuationCheck;
